package com.yxlgateway.utils;

/**
 * @author: yxl
 * @since: 2022-04-17
 **/

public class RedisKeyUtils {

    //点赞数据
    public static final String MAP_KEY_USER_LIKE = "redis_like";
    //被点赞数量
    public static final String MAP_KEY_USER_COUNT = "redis_like_count";

    //被点赞用户和点赞人作为key
    public static String getLikeKey(String likeUserId, String likePostId, String type){
        StringBuilder builder = new StringBuilder();
        builder.append(likeUserId);
        builder.append("::");
        builder.append(likePostId);
        builder.append("::");
        builder.append(type);
        return builder.toString();
    }
    public static String getLikeKey(String likeUserId, String type){
        StringBuilder builder = new StringBuilder();
        builder.append(likeUserId);
        builder.append("::");
        builder.append(type);
        return builder.toString();
    }
}
